import request from '@/utils/request'

export function getPostsByUser(auid) {
    return request({
        url: '/percenter/posts',
        method: 'get',
        params: { auid}
    })
}

export function updateProfile(user) {
    return request({
        url: '/percenter/profile',
        method: 'put',
        data: user
    })
}

export function getFollowers(uid) {
    return request({
        url: '/percenter/followers',
        method: 'get',
        params: { uid }
    })
}

export function getFavorites(uid) {
    return request({
        url: '/percenter/favorites',
        method: 'get',
        params: { uid }
    })
}

export function deactivateUser(uid) {
    return request({
        url: '/percenter/deactivate',
        method: 'put',
        params: { uid }
    })
}

export function submitFeedback(feedback) {
    return request({
        url: '/percenter/feedback',
        method: 'post',
        data: feedback
    })
}

export function updatePrivacySettings(profile) {
    return request({
        url: '/percenter/privacy',
        method: 'put',
        data: profile
    })
}